/**
 * 
 */
package com.ineatconseil.yougo.client.ui.common;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.place.shared.PlaceController;
import com.ineatconseil.yougo.client.i18n.YougoLabelConstants;
import com.ineatconseil.yougo.client.i18n.YougoLabelMessages;
import com.ineatconseil.yougo.client.service.UserClientService;
import com.ineatconseil.yougo.client.ui.main.application.ApplicationViewImpl;
import com.ineatconseil.yougo.client.ui.main.application.IApplicationView;
import com.ineatconseil.yougo.client.ui.main.application.header.HeaderViewImpl;
import com.ineatconseil.yougo.client.ui.main.application.header.IHeaderView;
import com.ineatconseil.yougo.client.ui.main.application.tabs.ITabsView;
import com.ineatconseil.yougo.client.ui.main.application.tabs.TabsViewImpl;
import com.ineatconseil.yougo.client.ui.main.application.tabs.requestTypesMngt.IRequestTypesView;
import com.ineatconseil.yougo.client.ui.main.application.tabs.requestTypesMngt.RequestTypesViewImpl;
import com.ineatconseil.yougo.client.ui.main.application.tabs.requestsMngt.IRequestsView;
import com.ineatconseil.yougo.client.ui.main.application.tabs.requestsMngt.RequestsViewImpl;
import com.ineatconseil.yougo.client.ui.main.application.tabs.requestsValidationMngt.IRequestsValidationView;
import com.ineatconseil.yougo.client.ui.main.application.tabs.requestsValidationMngt.RequestsValidationViewImpl;
import com.ineatconseil.yougo.client.ui.main.application.tabs.userTypesMngt.IUserTypesView;
import com.ineatconseil.yougo.client.ui.main.application.tabs.userTypesMngt.UserTypesViewImpl;
import com.ineatconseil.yougo.client.ui.main.application.tabs.usersMngt.IUsersView;
import com.ineatconseil.yougo.client.ui.main.application.tabs.usersMngt.UsersViewImpl;
import com.ineatconseil.yougo.client.ui.main.login.ILoginView;
import com.ineatconseil.yougo.client.ui.main.login.LoginViewImpl;

/**
 * @author aelamrani
 */
public class ClientFactoryImpl implements ClientFactory {
	
	private final EventBus eventBus = new SimpleEventBus();
	private final PlaceController placeController = new PlaceController(eventBus);
	private final YougoLabelConstants constants = GWT.create(YougoLabelConstants.class);
	private final YougoLabelMessages messages = GWT.create(YougoLabelMessages.class);
	private final ILoginView loginView = GWT.create(LoginViewImpl.class);
	private final IRequestsView requestsView = GWT.create(RequestsViewImpl.class);
	private final IRequestTypesView requestTypesView = GWT.create(RequestTypesViewImpl.class);
	private final IRequestsValidationView requestsValidationView = GWT.create(RequestsValidationViewImpl.class);
	private final IUsersView usersView = GWT.create(UsersViewImpl.class);
	private final IUserTypesView userTypesView = GWT.create(UserTypesViewImpl.class);
	private final IHeaderView headerView = GWT.create(HeaderViewImpl.class);
	private final ITabsView tabsView = GWT.create(TabsViewImpl.class);
	private final IApplicationView applicationView = GWT.create(ApplicationViewImpl.class);
	
	//Services REST
	private final UserClientService userClientService = GWT.create(UserClientService.class);
	
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public EventBus getEventBus() {
		return eventBus;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public PlaceController getPlaceController() {
		return placeController;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public YougoLabelConstants getLabelConstants() {
		return constants;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public YougoLabelMessages getLabelMessages() {
		return messages;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ILoginView getWelcomeView() {
		return loginView;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public IRequestsView getRequestsView() {
		return requestsView;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public IApplicationView getApplicationView() {
		return applicationView;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public IHeaderView getHeaderView() {
		return headerView;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public IUserTypesView getUserTypesView() {
		return userTypesView;
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public IUsersView getUsersView() {
		return usersView;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public IRequestsValidationView getRequestsValidationView() {
		return requestsValidationView;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public IRequestTypesView getRequestTypesView() {
		return requestTypesView;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ITabsView getTabsView() {
		return tabsView;
	}

	/**
	 * @return
	 */
	@Override
	public UserClientService getUserClientService() {
		return userClientService;
	}
}
